def collate_conjecture(n):
    track = [n]
    while n != 1:
        if n % 2 == 0:
            n = n / 2
        else:
            n = 3 * n + 1
        track.append(n)
    return track



for i in range (1,1000001):
    print collate_conjecture(i)

